home *** CD-ROM | disk | FTP | other *** search
- Path: ohstpy.mps.ohio-state.edu!vancleef
- From: vancleef@ohstpy.mps.ohio-state.edu
- Newsgroups: comp.lang.c++
- Subject: Re: HELP: Calling functions from DLLs
- Message-ID: <1996Jan9.004130.8690@ohstpy>
- Date: 9 Jan 96 00:41:30 -0500
- References: <1996Jan8.194827.23308@zippy.dct.ac.uk>
- Distribution: world
- Organization: The Ohio State University, Department of Physics
-
- I don't know if this is your problem, but if you want
- to link with a .DLL in Borland C++, use the IMPLIB facility.
-
- This creates a .LIB file from you .DLL, which you link
- with your application. The .LIB contains information as to
- how the .DLL is used.
-
- -Garrett
-
-
-
-
- In article <1996Jan8.194827.23308@zippy.dct.ac.uk>, ds11@st-and.ac.uk (Darren Steers) writes:
- > Hi,
- >
- > Can you help? I have been supplied with a DLL (not source code)
- > from a third party. It was compiled using MS Visual C++.
- >
- > I am using Borland C++ 4.5 and am having problems calling the functions
- > from the third party DLL.
- >
- > When I wrote a simple test DLL (Beep.cpp) the function prototype and
- > declaration were like this (From a book)
- >
- > void _FAR _EXPFUNC MakeBeep (int iCount);
- >
- > This worked great and I could use the function in my application
- > (CallBeep.cpp) to my hearts content.
- >
- > HOWEVER, the 3rd party DLL had its functions declared in this style
- >
- > void FAR PASCAL MakeBeep (int iCount);
- >
- > When I try to use this function I get this error message
- >
- > Linker Error: Undefined symbol MakeBeep(int) in module CALLBEEP.CPP
- >
- > Can I get my application to recognise functions declared in the FAR PASCAL
- > format, or do I need to get the source code and change the function
- > prototypes and definitions to _FAR _EXPFUNC ????
- >
- > Thanks for any help.
- >
- > Darren Steers
- >
- > University of St Andrews
- > Scotland
- >
- > ds11@st-and.ac.uk
-